home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1986 March
/
Ahoy_Magazine_86-03_1986_Double_L.d64
/
rooting routine
(
.txt
)
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS
UTF-8
Wrap
Commodore BASIC
|
1986-01-01
|
179 b
|
9 lines
10 rem problem #23-2 :
20 rem rooting routine
30 rem solution by dick eigenraam
40 rem
50 input n : g=1
60 if g*g<n then g=g+1 : goto 60
70 g=g-1 : if (g+.5)*(g+.5)<n then g=g+1
80 print g